<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户信息网</title>
</head>
<link href="js/layui/css/layui.css" rel="stylesheet" type="text/css"/>
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/layui/layui.all.js" type="text/javascript" charset="utf-8"></script>
<script src="js/loginjs/cunchu.js"></script>
<script src="js/adminuser.js" type="text/javascript" charset="utf-8"></script>
<link rel="stylesheet" type="text/css" href="js/layui/css/style.css"/>

<body>
<label class="layui-form-label">名字：</label>
<div class="layui-input-block">
    <input style="width: 200px;float: left;margin-top: 3px;"  type="text" id="userNickname" name="user_nickname"
           placeholder="请输入查询"
           class="layui-input">
    <span style="margin-left: 8px;">用户状态：</span>
    <select style="height: 36px;width: 75px;margin-top: 3px" id="zhuangtai">
        <option style="font-size: 16px;" value="">请选择</option>
        <option style="font-size: 16px;" value="0">正常</option>
        <option style="font-size: 16px;" value="1">禁用</option>
    </select>
    <input class="layui-btn layui-btn-mini " style="width: 70px;height: 36px;margin-left: 15px;float: right;" onclick="searchUsers()"
           value="搜索"/>
    <input class="layui-btn layui-btn-mini " style="width: 70px;height: 36px;margin-left: 15px;float: right;" onclick="openAdd()"
           value="添加"/>
    <input class="layui-btn layui-btn-mini " style="height: 36px;margin-left: 15px;float: right;" onclick="zhixing1()"
           value="修改管理员权限"/>
</div>


<table id="demo" lay-filter="test"></table>
<!-- 表格内部自定义模板 -->
<script type="text/html" id="barDemo">
    {{#  if(d.user_enabled == 0){ }}
    <a class="layui-btn layui-btn-mini  layui-btn-xs layui-btn-danger" lay-event="forbidden">禁用</a>
    {{#  } else { }}
    <a class="layui-btn layui-btn-mini  layui-btn-xs" lay-event="startUsing">启用</a>
    {{#  } }}
</script>

<div class="x-body" id="quanxian" style="display: none">
    <div class="layui-row layui-form">
  <!--      <fieldset class="layui-elem-field layui-field-title">
            <legend>角色信息</legend>&lt;!&ndash;
            <input type="hidden" id="privilege" th:value="${roleRes.privilege}"/>&ndash;&gt;
            <div class="layui-field-box">
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="col3">*</span>角色名称：</label>
                    <div class="layui-input-block">
                        <input type="hidden" name="roleId" readonly="readonly"/>
                        <input type="text" name="rolename" id="rolename" class="layui-input" placeholder="角色名称" lay-verify="required"/>
                    </div>
                </div>
            </div>
        </fieldset>-->
        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
            <legend>角色权限</legend>
            <div style="text-align: center;">
                <div class="layui-inline">
            <div id="privileges" class="demo-tree-more"></div>
                </div>
            </div>
        </fieldset>
        <div class="layui-form-item" style="text-align: center">
            <button class="layui-btn" lay-submit="" lay-filter="save">保存</button>
            <button class="layui-btn layui-btn-normal" onclick="x_admin_close()">取消</button>
        </div>
    </div>
</div>
<div id="popUpdateTest" style="display:none;text-align:center;">
    <div>
        <form class="layui-form layui-from-pane" autocomplete="off" lay-filter="formTest"
              style="margin-top:20px;text-align:center;">
            <div class="layui-form-item">
                <label class="layui-form-label">用户姓名：</label>
                <div class="layui-input-block">
                    <input style="width: 200px;" type="text" id="user_username" name="user_username" placeholder="请输入用户姓名"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户网名：</label>
                <div class="layui-input-block">
                    <input style="width: 200px;" type="text" id="user_nickname" name="user_nickname" placeholder="请输入用户网名"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户手机号：</label>
                <div class="layui-input-block">
                    <input style="width: 200px;" type="text" id="user_phoneNumber" name="user_phoneNumber" placeholder="请输入用户手机号"
                           class="layui-input">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">用户头像：</label>
                <div class="layui-input-block">
                    <input style="width: 200px;" type="text" id="user_userface" name="user_userface" placeholder="请输入用户头像"
                           class="layui-input">
                </div>
            </div>
        </form>
        <button class="layui-btn" style="width: 250px;height: 32px;margin-top: 12px;" onclick="setFormValue()">确认添加
        </button>
    </div>
</div>
<div>

</div>
</div>

<script type="text/html" id="titleTpl">
    {{#  if(d.user_enabled == 0){ }}
    正常
    {{#  } else { }}
    禁用
    {{#  } }}
</script>
<script>
   $(function () {
       $("layui-unselect").attr("class","layui-form-checked");
       $("layui-form-checkbox").attr("class","layui-form-checked");
       $("layui-form-checkbox").addClass("layui-form-checked");
       $("layui-unselect").addClass("layui-form-checked");
       console.log("执行完毕");
   })
</script>
</body>
</html>
